In recent years, a technique to establish communication of data such as video image via a network and reproduce the video image in real time while receiving such data has been put into practical use.
If system clocks of a transmission apparatus and a reception apparatus between which such data communication is established are not completely synchronous, difference in the system clock accumulates over time. Such accumulation of difference in the system clock over time results in a serious problem in real time video image transmission.
In real time video image transmission, in general, reproduction is started in the reception apparatus after data is buffered to some extent. If the system clock of the reception apparatus is earlier than the system clock of the transmission apparatus, an amount of video image data decoded in the reception apparatus becomes greater than an amount of video image data coded in the transmission apparatus. Accordingly, buffer in the reception apparatus gradually decreases, and finally underflow of the buffer occurs. In contrast, if the system clock of the reception apparatus is behind the system clock of the transmission apparatus, overflow of the buffer occurs. Overflow or underflow of the buffer in the reception apparatus results in necessity for buffering processing again of the data. Consequently, such a problem as temporary distortion of the video image or complete stop thereof is caused, leading to a factor impairing real time characteristics.
As a measure against such problems, a technique to synchronize a clock of the reception apparatus with a clock of the transmission apparatus by detecting to which extent the system clock of the reception apparatus deviates from the system clock of the transmission apparatus based on an amount of variation in the buffer in the reception apparatus or on variation in a packet transmission time period or the like has been developed. The buffer amount or the packet transmission time period, however, tends to fluctuate due to influence of a network between the transmission apparatus and the reception apparatus, and therefore, accurate synchronization control is difficult.
Synchronization control should thus be carried out in consideration of the influence of the network over which packets are transmitted. For example, Japanese Patent Laying-Open No. 2003-258894 discloses a method of eliminating influence of the network by smoothing a transmission time period for each packet with a low pass filter (LPF) and excluding the transmission time period that has significantly fluctuated due to the influence of the network. As variation in the packet transmission time period after the influence of the network has been eliminated exhibits monotonous decrease or monotonous increase due to difference in the system clock, based on that slope, synchronization of the system clock of the reception apparatus with the system clock of the transmission apparatus is facilitated.
In addition, Japanese Patent Laying-Open No. 2003-218842 discloses a technique, for eliminating the influence of the network, to find a relative maximum value and a relative minimum value of the packet transmission time period every prescribed time and to synchronize the system clock of the reception apparatus with the system clock of the transmission apparatus based on increase and decrease in the relative maximum value and the relative minimum value.
Jitter in the packet transmission time period appears more noticeably in a wireless network. One cause thereof includes, for example, frequent change in a physical rate in the wireless network in accordance with a communication environment. For example, Japanese Patent Laying-Open No. 2004-007183 discloses a method of radio transmission where a physical rate is fixed to 12 Mbps when video images are transmitted (SD (standard definition)) whereas the physical rate is varied when other types of data are transmitted.
In addition, Japanese Patent Laying-Open No. 2006-025112 discloses a method of transmission where a physical rate is fixed for real time data while the physical rate is varied for non-real-time data. In performing the synchronization method as described in Japanese Patent Laying-Open No. 2003-258894 or Japanese Patent Laying-Open No. 2003-218842, by transmitting specific data with the physical rate being fixed regardless of a communication environment as described in Japanese Patent Laying-Open No. 2004-007183 or Japanese Patent Laying-Open No. 2006-025112, jitter of the packet transmission time period due to variation in the physical rate can be prevented.
Monitoring increase and decrease in the packet transmission time period in order to synchronize system clocks in different systems of the transmission apparatus and the reception apparatus can be very effective means, as it can be realized with a simplified mechanism without a communication medium being limited. A greatest problem in such control, however, is that the packet transmission time period frequently jitters due to the influence of the network between the transmission apparatus and the reception apparatus.
In particular, in communication using wireless LAN (Local Area Network) complying with IEEE802.11a or the like, eight types of rates of a link between the transmission apparatus and the reception apparatus referred to as a physical rate can be set from 6 Mbps to 54 Mbps, and different physical rate brings about significantly different packet transmission time periods.
Referring to FIG. 10, difference in a packet transmission time period depending on a physical rate will be described. FIG. 10 illustrates a variation in a packet transmission time period actually measured in the reception apparatus when the physical rate is increased from 6 to 12, 18, and 24 Mbps for each second. It is seen from FIG. 10 that, if the physical rate is different, the packet transmission time period is significantly different. For example, when the physical rate changes from 6 Mbps to 12 Mbps, the packet transmission time period is shorter by approximately 300 μs. Therefore, in such a condition that the physical rate frequently varies, the packet transmission time period significantly jitters. By transmitting data at a constant physical rate without varying the physical rate, however, such jitter can be avoided.
Even if the physical rate is fixed, however, when a transmission packet where the time of transmission has been inserted in an upper layer of the transmission apparatus is not received by the reception apparatus but repeatedly re-sent through a MAC (Media Access Control) layer, the packet transmission time period significantly jitters. Where the packet is received by the reception apparatus after re-sending, the time of transmission still indicates the time at which the packet was first transmitted and it is not updated when it is re-sent. Therefore, the packet transmission time period has a value greater than when re-sending is not performed, by a time period spent for re-sending. Accordingly, even if the physical rate is fixed, the packet transmission time period significantly jitters depending on frequency of re-sending or the number of times of re-sending of the same packet.
In addition, in an example where the transmission apparatus includes a transmission buffer, due to frequent re-sending, all packets generated in the transmission apparatus are not successfully transmitted and such packets are accumulated in the transmission buffer. When a packet accumulated in the transmission buffer is transmitted, a waiting time in the transmission buffer is also included in the packet transmission time period, and therefore, the packet transmission time period further significantly jitters.
Moreover, in an example where a plurality of pieces of equipment establish communication, even in such a communication environment that the physical rate is fixed and re-sending is unlikely, a packet has to wait before transmission depending on congestion of communication. Therefore, the packet transmission time period jitters due to the waiting time.
Japanese Patent Laying-Open No. 2003-258894 and Japanese Patent Laying-Open No. 2003-218842 disclose a synchronization method capable of ignoring jitter of a packet transmission time period due to influence of a network. If a packet transmission time period is within a certain range and jitter is not significant, this method may be effective.
If the packet transmission time period significantly jitters as in jitter in the case of wireless LAN, according to the method of using a low pass filter in Japanese Patent Laying-Open No. 2003-258894, depending on a setting value of the low pass filter, such a condition that all packet transmission time periods are excluded by the low pass filter or the packet transmission time period obtained by the low pass filter still significantly jitters may occur.
Alternatively, according to the method of Japanese Patent Laying-Open No. 2003-218842, if such a condition that the physical rate frequently varies within a prescribed time period during which a relative maximum value and a relative minimum value of the packet transmission time period are measured occurs, the relative maximum value and the relative minimum value may vary in a direction different from a direction of difference in the system clock. Therefore, it is possible that the system clock of the reception apparatus is varied in such a manner that the difference from the system clock of the transmission apparatus is greater.
In addition, use of such a method that the transmission apparatus transmits data with the physical rate being fixed as disclosed in Japanese Patent Laying-Open No. 2004-007183 or Japanese Patent Laying-Open No. 2006-025112 can suppress jitter of the packet transmission time period to some extent. Depending on frequency of re-sending, a waiting time in the buffer, and congestion of communication, however, the packet transmission time period may jitter, which is not satisfactory.
The present invention was made to solve the above-described problems. An object of the present invention is to provide a communication apparatus transmitting a packet with a method capable of suppressing occurrence of jitter of a packet transmission time period measured in a reception apparatus, such that the reception apparatus accurately synchronizes a system clock thereof with a system clock of a transmission apparatus.
Another object of the present invention is to provide a recording medium storing a program for causing a computer to function as a communication apparatus transmitting a packet while suppressing occurrence of jitter of a packet transmission time period measured in a reception apparatus.